Hacettepe University Departmant
of Computer Engineering
BBM 415 Fundamentals of Image
Processing Laboratory
Fall 2022-2023
Programming Assignment 1 Report
Omer Kaan Vural
21987537
03.11.2022
Images of the Russian Empire: Colorizing
the Prokudin-Gorskii Photo Collection
Overview
The images obtained by a Russian photographer by investing the photos he once took
with red, green and blue filters are presented digitally in grayscale format. In this
assignment, we will try to combine and colorize these submitted photos. We will also make
various improvements using some algorithms.
Details of Approach
- With the opencv library, the methods of reading pictures and making changes in
pixels thanks to matrices were comprehended.
- Frames in the picture removed by cutting a certain percentage of the picture
- A single image file contains information of 3 different color channels. So by dividing
the picture into 3 equal parts, I brought it to a state where we can combine the
channels. Example below:
- I used gaussian blur for each channel to reduce noise in pictures
- After dividing the pictures into three and blurring them, we obtained a score by
exhaustive search with the NCC method in order to best match the three pictures
to each other. We aligned the pictures, identifying the best situation.
- After the best alignment was set i combined the r, g, b channels and got a colorized
picture
- After all these processes, I used various algorithms to make the pictures better and
to experiment with them. These are:
ï‚· Gamma Correction
ï‚· Laplacian Filtering
ï‚· Histogram Equalization
The results at the end of all these steps are below.
1 -> not aligned image
2 -> gaussian blurred image
3 -> blurred and aligned image
4 -> plus laplacian filtered image
5 -> plus gamma adjusted image (most of the images are bright. So 0.8 gamma is applied
all)
Ordering as -> 1 2
3 4
5
Alignment Problem
Most of the images can not be splitted so well. Because border degrees and flatness are
different. So exhaustive search is applied with wide range (-40, 40).
Also, if I use laplacian filter, aligning red and green channels by blue does not work well.
So, the best alignment show up alignin by green channel when use laplacian. I think this
problem might be occurred because of that I use laplacian filter raw grayscale image but
when I tried to filter channels seperately, nothing changed.
Further aligning channels differently does not make a difference except location of image.
So, I have not figured out why laplacian filter works well only aligning channels by green.
This is the reason images that laplacian filtered has not the same alignment 1., 2. and 3.
Image. Slightly difference by location of image.
Enhancement
I tested histogram equalization and laplacian filter a few images (not all). Laplacian filter
gives better results. So I do not use histogram equalization instead laplacian. All of the
images below are laplacian filtered
Image 1 (00125v.jpg)
Image 2 (00194v.jpg)
Image 3 (00137v.jpg)
Image 4 (00153v.jpg)
Image 5 (00398v.jpg)
Image 6 (00458v.jpg)
Image 7 (00804v.jpg)
Image 8 (00911v.jpg)
Image 9 (01522v.jpg)